<template>
    <div>

    </div>
</template>
<script>
    import http from "../../lib/http"
    import jquery from "../../lib/jquery"
    export default {
        data:function () {
            return {
                aclass : []
            }
        },
        computed :  {
            list : function () {
                this.aclass = []
                for(var i=0,j=this.rows.length;i<j;i++){
                    var data = this.rows[i]
                    if(typeof data.answer_data == "string" && data.answer_data != "") {
                        data.answer_data = JSON.parse(data.answer_data)
                    }
                    console.log(data.answer_choose_data)
                    if(data.answer_choose_data != ""){
                        if(typeof data.answer_choose_data == "string") {
                            data.answer_choose_data = JSON.parse(data.answer_choose_data)
                        }
                        for(var k in data.answer_choose_data){
                            //alert(k)
                            this.aclass[k] = data.answer_choose_data[k]
                        }

                    }
                }
                return this.rows
            }
        },
        created : function () {
            var self = this
            http.alive(this,function(){
                http.get(self,"cs_test_libraries_item/simu/"+self.simu_id).then(function (res) {
                    self.loading = false
                    self.rows = res.data.data
                })
            })
        },
        methods : {

        }
    }
</script>
